from faker import Faker


class FakerUtil:
    def __init__(self):
        self.faker = Faker()

    def fake_user_agent(self) -> str:
        """_summary_: 生成随机的User-Agent

        Returns:
            _type_: str
        """
        return self.faker.user_agent()

    def fake_origin(self) -> str:
        """_summary_: 生成随机的Origin

        Returns:
            _type_: str
        """
        return f"https://{self.faker.domain_name()}"


# 示例用法
if __name__ == "__main__":
    fake_http_util = FakerUtil()
    print("Random User-Agent:", fake_http_util.fake_user_agent())
    print("Random Origin:", fake_http_util.fake_origin())
